3.1.51 \(\int \frac {\log (c (a+b \sqrt {x})^p)}{x^2} \, dx\) [51]

Optimal. Leaf size=63 \[ -\frac {b p}{a \sqrt {x}}+\frac {b^2 p \log \left (a+b \sqrt {x}\right )}{a^2}-\frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x}-\frac {b^2 p \log (x)}{2 a^2} \]

[Out]

-1/2*b^2*p*ln(x)/a^2+b^2*p*ln(a+b*x^(1/2))/a^2-ln(c*(a+b*x^(1/2))^p)/x-b*p/a/x^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2504, 2442, 46} \begin {gather*} \frac {b^2 p \log \left (a+b \sqrt {x}\right )}{a^2}-\frac {b^2 p \log (x)}{2 a^2}-\frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x}-\frac {b p}{a \sqrt {x}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Log[c*(a + b*Sqrt[x])^p]/x^2,x]

[Out]

-((b*p)/(a*Sqrt[x])) + (b^2*p*Log[a + b*Sqrt[x]])/a^2 - Log[c*(a + b*Sqrt[x])^p]/x - (b^2*p*Log[x])/(2*a^2)

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 2442

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[(f + g*
x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/(g*(q + 1))), x] - Dist[b*e*(n/(g*(q + 1))), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 2504

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[I
nt[x^(Simplify[(m + 1)/n] - 1)*(a + b*Log[c*(d + e*x)^p])^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p,
 q}, x] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0]) &&  !(EqQ[q, 1] && ILtQ[n, 0] &&
 IGtQ[m, 0])

Rubi steps

\begin {align*} \int \frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x^2} \, dx &=2 \text {Subst}\left (\int \frac {\log \left (c (a+b x)^p\right )}{x^3} \, dx,x,\sqrt {x}\right )\\ &=-\frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x}+(b p) \text {Subst}\left (\int \frac {1}{x^2 (a+b x)} \, dx,x,\sqrt {x}\right )\\ &=-\frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x}+(b p) \text {Subst}\left (\int \left (\frac {1}{a x^2}-\frac {b}{a^2 x}+\frac {b^2}{a^2 (a+b x)}\right ) \, dx,x,\sqrt {x}\right )\\ &=-\frac {b p}{a \sqrt {x}}+\frac {b^2 p \log \left (a+b \sqrt {x}\right )}{a^2}-\frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x}-\frac {b^2 p \log (x)}{2 a^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 55, normalized size = 0.87 \begin {gather*} -\frac {\log \left (c \left (a+b \sqrt {x}\right )^p\right )}{x}-\frac {b p \left (\frac {2 a}{\sqrt {x}}-2 b \log \left (a+b \sqrt {x}\right )+b \log (x)\right )}{2 a^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Log[c*(a + b*Sqrt[x])^p]/x^2,x]

[Out]

-(Log[c*(a + b*Sqrt[x])^p]/x) - (b*p*((2*a)/Sqrt[x] - 2*b*Log[a + b*Sqrt[x]] + b*Log[x]))/(2*a^2)

________________________________________________________________________________________

Maple [F]
time = 0.03, size = 0, normalized size = 0.00 \[\int \frac {\ln \left (c \left (a +b \sqrt {x}\right )^{p}\right )}{x^{2}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(c*(a+b*x^(1/2))^p)/x^2,x)

[Out]

int(ln(c*(a+b*x^(1/2))^p)/x^2,x)

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 53, normalized size = 0.84 \begin {gather*} \frac {1}{2} \, b p {\left (\frac {2 \, b \log \left (b \sqrt {x} + a\right )}{a^{2}} - \frac {b \log \left (x\right )}{a^{2}} - \frac {2}{a \sqrt {x}}\right )} - \frac {\log \left ({\left (b \sqrt {x} + a\right )}^{p} c\right )}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(a+b*x^(1/2))^p)/x^2,x, algorithm="maxima")

[Out]

1/2*b*p*(2*b*log(b*sqrt(x) + a)/a^2 - b*log(x)/a^2 - 2/(a*sqrt(x))) - log((b*sqrt(x) + a)^p*c)/x

________________________________________________________________________________________

Fricas [A]
time = 0.42, size = 55, normalized size = 0.87 \begin {gather*} -\frac {b^{2} p x \log \left (\sqrt {x}\right ) + a b p \sqrt {x} + a^{2} \log \left (c\right ) - {\left (b^{2} p x - a^{2} p\right )} \log \left (b \sqrt {x} + a\right )}{a^{2} x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(a+b*x^(1/2))^p)/x^2,x, algorithm="fricas")

[Out]

-(b^2*p*x*log(sqrt(x)) + a*b*p*sqrt(x) + a^2*log(c) - (b^2*p*x - a^2*p)*log(b*sqrt(x) + a))/(a^2*x)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 326 vs. \(2 (56) = 112\).
time = 10.81, size = 326, normalized size = 5.17 \begin {gather*} \begin {cases} - \frac {2 a^{3} \sqrt {x} \log {\left (c \left (a + b \sqrt {x}\right )^{p} \right )}}{2 a^{3} x^{\frac {3}{2}} + 2 a^{2} b x^{2}} - \frac {2 a^{2} b p x}{2 a^{3} x^{\frac {3}{2}} + 2 a^{2} b x^{2}} - \frac {2 a^{2} b x \log {\left (c \left (a + b \sqrt {x}\right )^{p} \right )}}{2 a^{3} x^{\frac {3}{2}} + 2 a^{2} b x^{2}} - \frac {a b^{2} p x^{\frac {3}{2}} \log {\left (x \right )}}{2 a^{3} x^{\frac {3}{2}} + 2 a^{2} b x^{2}} - \frac {2 a b^{2} p x^{\frac {3}{2}}}{2 a^{3} x^{\frac {3}{2}} + 2 a^{2} b x^{2}} + \frac {2 a b^{2} x^{\frac {3}{2}} \log {\left (c \left (a + b \sqrt {x}\right )^{p} \right )}}{2 a^{3} x^{\frac {3}{2}} + 2 a^{2} b x^{2}} - \frac {b^{3} p x^{2} \log {\left (x \right )}}{2 a^{3} x^{\frac {3}{2}} + 2 a^{2} b x^{2}} + \frac {2 b^{3} x^{2} \log {\left (c \left (a + b \sqrt {x}\right )^{p} \right )}}{2 a^{3} x^{\frac {3}{2}} + 2 a^{2} b x^{2}} & \text {for}\: a \neq 0 \\- \frac {p}{2 x} - \frac {\log {\left (c \left (b \sqrt {x}\right )^{p} \right )}}{x} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(c*(a+b*x**(1/2))**p)/x**2,x)

[Out]

Piecewise((-2*a**3*sqrt(x)*log(c*(a + b*sqrt(x))**p)/(2*a**3*x**(3/2) + 2*a**2*b*x**2) - 2*a**2*b*p*x/(2*a**3*
x**(3/2) + 2*a**2*b*x**2) - 2*a**2*b*x*log(c*(a + b*sqrt(x))**p)/(2*a**3*x**(3/2) + 2*a**2*b*x**2) - a*b**2*p*
x**(3/2)*log(x)/(2*a**3*x**(3/2) + 2*a**2*b*x**2) - 2*a*b**2*p*x**(3/2)/(2*a**3*x**(3/2) + 2*a**2*b*x**2) + 2*
a*b**2*x**(3/2)*log(c*(a + b*sqrt(x))**p)/(2*a**3*x**(3/2) + 2*a**2*b*x**2) - b**3*p*x**2*log(x)/(2*a**3*x**(3
/2) + 2*a**2*b*x**2) + 2*b**3*x**2*log(c*(a + b*sqrt(x))**p)/(2*a**3*x**(3/2) + 2*a**2*b*x**2), Ne(a, 0)), (-p
/(2*x) - log(c*(b*sqrt(x))**p)/x, True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 132 vs. \(2 (55) = 110\).
time = 5.65, size = 132, normalized size = 2.10 \begin {gather*} -\frac {\frac {b^{3} p \log \left (b \sqrt {x} + a\right )}{{\left (b \sqrt {x} + a\right )}^{2} - 2 \, {\left (b \sqrt {x} + a\right )} a + a^{2}} - \frac {b^{3} p \log \left (b \sqrt {x} + a\right )}{a^{2}} + \frac {b^{3} p \log \left (b \sqrt {x}\right )}{a^{2}} + \frac {{\left (b \sqrt {x} + a\right )} b^{3} p - a b^{3} p + a b^{3} \log \left (c\right )}{{\left (b \sqrt {x} + a\right )}^{2} a - 2 \, {\left (b \sqrt {x} + a\right )} a^{2} + a^{3}}}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(a+b*x^(1/2))^p)/x^2,x, algorithm="giac")

[Out]

-(b^3*p*log(b*sqrt(x) + a)/((b*sqrt(x) + a)^2 - 2*(b*sqrt(x) + a)*a + a^2) - b^3*p*log(b*sqrt(x) + a)/a^2 + b^
3*p*log(b*sqrt(x))/a^2 + ((b*sqrt(x) + a)*b^3*p - a*b^3*p + a*b^3*log(c))/((b*sqrt(x) + a)^2*a - 2*(b*sqrt(x)
+ a)*a^2 + a^3))/b

________________________________________________________________________________________

Mupad [B]
time = 0.66, size = 49, normalized size = 0.78 \begin {gather*} \frac {2\,b^2\,p\,\mathrm {atanh}\left (\frac {2\,b\,\sqrt {x}}{a}+1\right )}{a^2}-\frac {\ln \left (c\,{\left (a+b\,\sqrt {x}\right )}^p\right )}{x}-\frac {b\,p}{a\,\sqrt {x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(c*(a + b*x^(1/2))^p)/x^2,x)

[Out]

(2*b^2*p*atanh((2*b*x^(1/2))/a + 1))/a^2 - log(c*(a + b*x^(1/2))^p)/x - (b*p)/(a*x^(1/2))

________________________________________________________________________________________